<!--  新列表 -->
<template>
	<view>
		<view class="m-bg-w">
			<view class="u-m-t-30 m-mg-lr" v-if="list.length > 0">
				<view class="u-flex u-p-b-20 boxbotttom u-p-t-30" v-for="(item, index) in list" :key="index" @click="gouplo(item.id)">
					<view><u--image :src="type === 1 ? yuming + item.image : item.image" width="100" height="100"></u--image></view>
					<view class="u-m-l-30 w_100">
						<view class="u-flex u-flex-between u-flex-items-center">
							<view class="m-font-b u-font-36 m-line-1">{{ item.name }}</view>
							<view class="m-bg-w m-font-b u-m-l-10 m-flex-no" :class="item.saletype == textType ? 'onShou' : 'offShou'">{{ item.saletype }}</view>
						</view>
						<view class="m-c-o u-m-t-6 m-font-b u-font-32 m-c-r">{{ item.commissiontext }}</view>
						<view class="u-flex u-flex-items-center u-m-t-10">
							<view class="borcor u-m-r-10 m-flex-no">{{ item.buildingtype }}</view>
							<view class="m-flex-no u-m-r-10 m-c-h m-flex-no">{{ item.areaname }}</view>
							<view class="m-line-1 m-c-h">{{ item.aveprice }}元/m²-{{ item.avepricemax }}元/m²</view>
						</view>
						<view class="u-flex u-flex-wrap" v-if="item.characteristic && type != 1">
							<view class="u-flex u-flex-wrap" v-if="JSON.parse(item.characteristic).length">
								<view class="u-m-t-10 u-m-r-10" v-if="itm" v-for="(itm, idx) in JSON.parse(item.characteristic)" :key="idx">
									<!-- <u-tag borderColor="#bfbfbf" color="#6b6b6b" :text="itm" plain size="mini"></u-tag> -->
									<text class="boxminwid" v-if="itm.name">{{ itm.name }}</text>
								</view>
							</view>
						</view>
					</view>
				</view>
				<u-loadmore :status="listMore" />
			</view>
			<list-empty v-else text="暂时没有数据哟!" list="data" :listHighly="listHighly"></list-empty>
			<obtain :show="obtain" @showchange="obtain = false"></obtain>
		</view>
	</view>
</template>

<script>
export default {
	name: 'newlist',
	props: {
		list: {
			type: Array,
			default: () => []
		},
		listHighly: {
			type: Number,
			default: 3
		},
		type: {
			type: Number,
			default: 0
		},
		listMore: {
			type: String,
			default: 'nomore'
		},
		textType: {
			type: String,
			default: 'nomore'
		}
	},
	data() {
		return {};
	},
	methods: {
		gouplo(id) {
			this.nextNav('/pages/room/details?id=' + id, 1);
		}
	}
};
</script>

<style lang="scss" scoped>
.onShou {
	width: 100rpx;
	text-align: center;
	height: 40rpx;
	line-height: 40rpx;
	border-radius: 6rpx;
	background-color: #0e5642;
	color: #fff;
}
.offShou {
	width: 100rpx;
	text-align: center;
	height: 40rpx;
	line-height: 40rpx;
	border-radius: 6rpx;
	background-color: #e6e6e6;
	color: #fff;
}
.boxbotttom {
	border-bottom: 1rpx solid #f1f1f1;
}

.boxminwid {
	min-width: 80rpx;
	padding: 0 10rpx;
	border-radius: 5rpx;
	height: 40rpx;
	line-height: 38rpx;
	text-align: center;
	border: 1rpx solid #bfbfbf;
	color: #6b6b6b;
}

.borcor {
	border: 2rpx solid #0e5642;
	color: #0e5642;
	padding: 0 6rpx;
	height: 40rpx;
	background-color: #f2f2f2;
	line-height: 36rpx;
	border-radius: 5rpx;
}
</style>
